import { ElNotification, ElMessageBox, ElMessage } from 'element-plus'
import nProgress from 'nprogress'
// succesNotify
export function Notify(message, type = "success", dangerouslyUseHTMLString = true) {
  ElNotification({
    message,
    type,
    dangerouslyUseHTMLString,
    duration: 3000
  })
}
// 弹出提示
export function showModel(content = '提示内容', type = 'warning', title = '') {
  return ElMessageBox.confirm(
    content,
    title,
    {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type,
    }
  )

}
// 全局loading-show
export function loadingShow() {
  nProgress.start()

}




// 全局loading-yicang
export function loadingHidden() {
  nProgress.done()

}

// 提交内容
export function showPrompt(title,value='') {
  return ElMessageBox.prompt(title, '', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    inputValue:value
  })

}
